package com.tanhua.commons.utils;

public class HuanBi {
    //环比计算方法
    public static Double computeRate(Integer today, Integer yesterday) {
        Double currentIssue = Double.valueOf(today);
        Double previousPeriod = Double.valueOf(yesterday);
        if ( previousPeriod != 0) {
            Double d = Double.valueOf((currentIssue - previousPeriod) / previousPeriod * 100);
            return d;
        }
        return null;
    }
}
